From: Jan Alexander Steffens (heftig) Date: Mon, 25 Jan 2021 21:33:46 +0000 (+0100) Subject: modules: Simplify _gtk_get_module_path X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1~1^2~83^2^2~489^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=23f0a29260c68e40458a5c385bd376303a106339;p=gtk4.git modules: Simplify _gtk_get_module_path Remove the bizarre loops. --- diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c index 9e487a64d6..aace5dcbc9 100644 --- a/gtk/gtkmodules.c +++ b/gtk/gtkmodules.c @@ -160,24 +160,10 @@ _gtk_get_module_path (const char *type) count = 0; for (path = get_module_path (); *path; path++) { - int use_version, use_host; - - for (use_version = TRUE; use_version >= FALSE; use_version--) - for (use_host = TRUE; use_host >= FALSE; use_host--) - { - char *tmp_dir; - - if (use_version && use_host) - tmp_dir = g_build_filename (*path, GTK_BINARY_VERSION, GTK_HOST, type, NULL); - else if (use_version) - tmp_dir = g_build_filename (*path, GTK_BINARY_VERSION, type, NULL); - else if (use_host) - tmp_dir = g_build_filename (*path, GTK_HOST, type, NULL); - else - tmp_dir = g_build_filename (*path, type, NULL); - - result[count++] = tmp_dir; - } + result[count++] = g_build_filename (*path, GTK_BINARY_VERSION, GTK_HOST, type, NULL); + result[count++] = g_build_filename (*path, GTK_BINARY_VERSION, type, NULL); + result[count++] = g_build_filename (*path, GTK_HOST, type, NULL); + result[count++] = g_build_filename (*path, type, NULL); } result[count++] = NULL;